home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 June
/
EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso
/
earcd
/
dbase
/
kf223.lha
/
KingFisher-Distribution
/
Install-KingFisher
< prev
next >
Wrap
Text File
|
1996-04-25
|
17KB
|
445 lines
; Installer Script for KingFisher Release 2
; Copyright © 1994,1995,1996 Udo Schuermann
; All rights reserved
; $VER: Install-KingFisher 2.23 (25.4.96)
;
;
; Installer and Installer project icon
; (c) Copyright 1991-93 Commodore-Amiga, Inc. All Rights Reserved.
; Reproduced and distributed under license from Commodore.
;
; INSTALLER SOFTWARE IS PROVIDED "AS-IS" AND SUBJECT TO CHANGE;
; NO WARRANTIES ARE MADE. ALL USE IS AT YOUR OWN RISK. NO LIABILITY
; OR RESPONSIBILITY IS ASSUMED.
; set language=national language
(procedure install-language (
(set catDest ("KFDEST:Catalogs/%s" language))
(if (not (exists catDest))
(makedir catDest (safe)))
(set src (tackon filepath ("Catalogs/%s/KingFisher.catalog" language)))
(if (not (exists src))
(set src ("%s.gz" src)))
(copyfiles (source src) (dest catDest))
(if (= (".gz" (substr src (- (strlen src) 3))))
(run ("stack 50000\nram:gunzip >NIL: <NIL: -r \"%s\"" (tackon catDest "KingFisher.catalog.gz"))))
(set copied (+ copied (getsize (tackon catDest "KingFisher.catalog"))))
(if (> copied total) (set total copied))
(complete (/ (* copied 100) total))
))
; call w/in foreach loop:
; always:overwrite?; workinfo=general description; @each-name=name
(procedure condcopy (
(set cond-copied 0)
(set doit 1)
(set fname (tackon "KFDEST:" @each-name))
(if (= always 0)
(if (exists fname)
(set doit 0)))
(if doit (
(working ("\nInstalling KingFisher Release 2\n\n%s\n\n%s" workinfo @each-name))
(copyfiles (source (tackon filepath @each-name)) (dest "KFDEST:"))
(if (= (".gz" (substr @each-name (- (strlen @each-name) 3)))) (
(set fname (substr @each-name 0 (- (strlen @each-name) 3)))
(working ("\nInstalling KingFisher Release 2\n\n%s\n\n%s" workinfo fname))
(run ("stack 50000\nram:gunzip >NIL: <NIL: -f \"%s\"" (tackon "KFDEST:" @each-name)))))
(set cond-copied 1)))
(set copied (+ copied (getsize (tackon "KFDEST:" fname))))
(if (> copied total) (set total copied))
(complete (/ (* copied 100) total))
))
; view only once; from current 'filepath'
(procedure viewreadme (
(if (= ViewInfo 1) (
(if (> (run ("run SYS:Utilities/MultiView %sReadme" filepath)) 0)
(if (> (run ("run SYS:Utilities/AmigaGuide %sReadme" filepath)) 0)
(run ("run more %sReadme" filepath))))))
(set ViewInfo 0)
))
; Main Entry Point
(set dosver (/ (getversion "dos.library" (resident)) 65536))
(set usr @user-level)
(user 1)
(if (< dosver 37)
(message
"KingFisher Release 2 requires at least Kickstart 2.04 (V37) but your "
"system's Kickstart (ROM software) is too old to support KingFisher!\n\n"
"It is suggested that you abort the installation and upgrade your "
"system. KingFisher Release 2 will not function on your computer until "
"you perform the necessary upgrade."))
(set parts 0)
(set defopts 0)
(if (or (exists "KingFisher") (exists "KingFisher.gz"))
(set defopts (bitor defopts %00001011)))
(if (exists "Catalogs")
(set defopts (bitor defopts %00000100)))
(if (or (exists "1000Fish.kfdb") (exists "1000Fish.kfdb.gz"))
(set defopts (bitor defopts %00010000)))
(if (or (exists "Example1.format") (exists "Example1.format.gz"))
(set defopts (bitor defopts %00100000)))
(foreach "" "gad.#?.image(%|.gz)"
(set defopts (bitor defopts %01000000)))
(if (exists "Developer")
(set defopts (bitor defopts %10000000)))
(set opts
(askoptions
(help (cat
"Contents:\n"
" 1) Available archives on Aminet and elsewhere\n"
" 2) Details on installable components\n\n"
"«1»\n"
"KingFisher Release 2 is shipped in as many as three (3) separate archives. All desired "
"archives should be extracted before installation is begun:\n\n"
"KingFisher223.lha -- All necessary files for KingFisher Release 2 to function, "
"except for a database. This file is usually the only one that you need to upgrade if a new "
"version of KingFisher is released. The "223" in the name refers to KingFisher "
"Release 2 version 23 (or KingFisher 2.23).\n\n"
"KingFisher2db.lha -- A complete database of all 1000+ Fish Disks. You rarely, "
"if ever, need to download and install this file twice. The installer will not overwrite an "
"already installed database, regardless if the database is available or not.\n\n"
"KingFisher2ex.lha -- Miscellaneous files for KingFisher, including the "
"KingFisher Developer Kit, button images, ARexx example files, search and custom format "
"example files, etc. This file is occasionally updated to reflect changes and additions "
"(especially to the server software, and thus, to the Developer Kit), but this file is, in "
"general, fairly static.\n\n"
"«2»\n"
"Depending on what you have available on disk or in the current directory, you may choose "
"to install any or all of the following components:\n\n"
"KingFisher Release 2 -- Except for a database, all you need to run KingFisher.\n\n"
"Online Documentation -- AmigaGuide® formatted hypertext, designed especially for KS3.x or "
"later versions of the operating system.\n\n"
"Language Catalogs -- Operate KingFisher in a language other than English.\n\n"
"RexxFisher -- Access KingFisher's databases from any program with the help of this ARexx "
"interface to the server.\n\n"
"Miscellaneous Files -- Search results and alternate display / print / export format files.\n\n"
"Button Images -- Example images to replace some or all of KingFisher's 28 interface buttons.\n\n"
"Developer Kit -- Source code and examples to get you started using the KingFisher Database "
"Server API in your own projects."))
(default defopts)
(prompt (cat
"The following portions are available for installation. Items not "
"initially checked are unavailable in this distribution. Press HELP "
"for additional information."))
(choices
"KingFisher Release 2 . . (~210K)"
"Online Documentation . . (~255K)"
"Language Catalogs . . (each ~8K)"
"RexxFisher + Examples . . (~42K)"
"1000+ Fish Database . . (~2200K)"
"Miscellaneous files . . (~100K)"
"Button images . . . . . . (~15K)"
"Developer Kit . . . . . (~330K)"
)))
(if (and (or (in opts 0) (in opts 1) (in opts 3)) (not (or (exists "KingFisher") (exists "KingFisher.gz")))) (
(set opts (bitxor opts %1011))
(message
"The KingFisher / KFServer / RexxFisher software is not available in this distribution.\n\nIf "
"you downloaded the distribution from a BBS or Aminet, you need to also download the file "
"'KingFisher223.lha'.")))
(if (and (in opts 2) (not (exists "Catalogs"))) (
(set opts (bitxor opts %100))
(message
"No language catalogs are available in this distribution.\n\nIf you downloaded the distribution "
"from a BBS or Aminet, you also need to download the file 'KingFisher2.lha'.")))
(if (and (in opts 4) (not (or (exists "1000Fish.kfdb") (exists "1000Fish.kfdb.gz")))) (
(set opts (bitxor opts %10000))
(message
"The '1000 Fish Database' is not available in this distribution.\n\nIf you downloaded the "
"distribution from a BBS or Aminet, you also need to download the file 'KingFisher2db.lha'.")))
(if (and (in opts 5) (not (or (exists "Example1.format") (exists "Example1.format.gz")))) (
(set opts (bitxor opts %100000))
(message
"The miscellaneous example files and button images are not part of this distribution.\n\nIf "
"you downloaded the distribution from a BBS or Aminet, you also need to download the file "
"'KingFisher2ex.lha'.")))
(set foo 0)
(foreach "" "gad.#?.image(%|.gz)"
(set foo 1))
(if (and (in opts 6) (= foo 0)) (
(set opts (bitxor opts %1000000))
(message
"Button images to demonstrate the replacement of KingFisher's own buttons are not included "
"in this distribution.\n\nIf you downloaded the distribution from a BBS or Aminet, you also "
"need to download the file 'KingFisher2ex.lha'.")))
(if (and (in opts 7) (not (exists "Developer"))) (
(set opts (bitxor opts %10000000))
(message
"The Developer Kit is not available in this distribution.\n\nYou need to either download "
"the file 'KingFisher2ex.lha' or request the developer kit from the author, either as "
"part of a paid upgrade on disk or free via email.\n\nPlease see the doocumentation for "
"ordering information!")))
(if (= opts 0) (
(complete 100)
(message "Looks like the Installer has nothing to do...")
(exit)))
(user usr)
(if (in opts 1)
(if (< dosver 39)
(set WrapIt
(askbool
(prompt (cat
"»»---> ATTENTION - READ THIS! <---««\n\n"
"The KingFisher2.guide documentation that ships with "
"KingFisher Release 2 is formatted with long lines to "
"provide Kickstart 3.x users with more readable, and "
"better formatted documentation.\n"
"THIS FORMAT CAUSES SERIOUS TROUBLE for AmigaGuide "
"under Kickstart 2.x wherefore a special 'WrapGuide' "
"tool is supplied to fix the .guide file for use with "
("your installed version of AmigaDOS V%ld\n\n" dosver)
"You are STRONGLY URGED to have Installer apply "
"the WrapGuide operation to the documentation!!"))
(choices "WRAPGUIDE" "Skip it")
(default "WRAPGUIDE")
(help @askbool-help)))
(set WrapIt
(askbool
(prompt (cat
"The KingFisher2.guide documentation that ships with "
"KingFisher Release 2 is formatted with long lines to "
"provide Kickstart 3.x users with more readable, "
"paragraph oriented documentation.\n\n"
"If you have pressing reasons to convert this file "
"to a version that will not cause trouble with Kickstart "
"2.x, then you may choose to have the Installer apply "
"the supplied 'WrapGuide' tool to the file.\n\n"
"For best performance under your installed version of "
("AmigaDOS %ld, it is RECOMMENDED TO SKIP THIS STEP!" dosver)))
(choices "WrapGuide" "SKIP IT")
(default "SKIP IT")
(help @askbool-help)))))
(set defcats 0)
(set catalogs 0)
(if (exists "Locale:Catalogs/Dansk")
(set defcats (bitor defcats 1)))
(if (exists "Locale:Catalogs/Deutsch")
(set defcats (bitor defcats 2)))
(if (exists "Locale:Catalogs/Español")
(set defcats (bitor defcats 4)))
(if (exists "Locale:Catalogs/Nederlands")
(set defcats (bitor defcats 8)))
(if (exists "Locale:Catalogs/Suomi")
(set defcats (bitor defcats 16)))
(if (exists "Locale:Catalogs/Svenska")
(set defcats (bitor defcats 32)))
(if (and (in opts 2) (<> defcats 0)) (
(set catalogs
(askoptions
(help @askoptions-help)
(default defcats)
(prompt (cat
"Choose any combination of the language catalogs listed below. Those "
"initially checked are your choices when you installed AmigaOS:")
(choices
"Dansk"
"Deutsch"
"Español"
"Nederlands"
"Suomi"
"Svenska"
))))
(set CATCOUNT 0)
(if (in catalogs 0) (set CATCOUNT (+ CATCOUNT 1)))
(if (in catalogs 1) (set CATCOUNT (+ CATCOUNT 1)))
(if (in catalogs 2) (set CATCOUNT (+ CATCOUNT 1)))
(if (in catalogs 3) (set CATCOUNT (+ CATCOUNT 1)))
(if (in catalogs 4) (set CATCOUNT (+ CATCOUNT 1)))
(if (in catalogs 5) (set CATCOUNT (+ CATCOUNT 1)))))
(set MINSPC 0)
(if (in opts 0) (set MINSPC (+ MINSPC 210)))
(if (in opts 1) (set MINSPC (+ MINSPC 255)))
(if (in opts 2) (set MINSPC (+ MINSPC (* CATCOUNT 8))))
(if (in opts 3) (set MINSPC (+ MINSPC 42)))
(if (in opts 4) (set MINSPC (+ MINSPC 2200)))
(if (in opts 5) (set MINSPC (+ MINSPC 100)))
(if (in opts 6) (set MINSPC (+ MINSPC 15)))
(if (in opts 7) (set MINSPC (+ MINSPC 330)))
(set DISKFREE 0)
(while (< DISKFREE MINSPC) (
(set DESTIN (tackon
(askdir
(prompt (cat
"Where do you wish to install KingFisher Release 2?\n"
"(A drawer named 'KingFisher2' will be created there.)"))
(help @askdir-help)
(default "SYS:"))
"KingFisher2"))
(set @default-dest DESTIN)
(set @execute-dir DESTIN)
(set DISKFREE (/ (getdiskspace ("%s:" (getdevice DESTIN))) 1024))
(if (< DISKFREE MINSPC)
((if (= @user-level 0) (user 1))
(if (askbool
(prompt (cat
("\nPlease note:\n\nThe selected volume reports only %ldK of " DISKFREE)
("diskspace, whereas you should have at least %ldK free!\n\n" MINSPC)
"Are you sure you wish to proceed with installation to this volume?"))
(choices "Yes, proceed" "No, try another")
(default "No, try another")
(help @askbool-help))
(set DISKFREE MINSPC))))))
(user 1)
(message ("KingFisher Release 2 will be installed to the directory\n\n%s" DESTIN))
(user usr)
(if (not (exists DESTIN))
(makedir DESTIN (infos) (safe)))
(makeassign "KFINST")
(makeassign "KFDEST")
(makeassign "KF2-Inst-1")
(makeassign "KF2-Inst-2")
(if (or (exists "KingFisher") (exists "KingFisher.gz"))
(makeassign "KF2-Inst-1" "" (safe)))
(if (or (exists "1000Fish.index") (exists "1000Fish.index.gz"))
(makeassign "KF2-Inst-2" "" (safe)))
(makeassign "KFINST" "" (safe))
(makeassign "KFDEST" DESTIN (safe))
(copyfiles (source "KFINST:gunzip") (dest "ram:"))
(if WrapIt (copyfiles (source "KFINST:WrapGuide") (dest "ram:")))
(complete 0)
(set total (* MINSPC 1024))
(set copied 0)
(set ViewInfo 1)
(set filepath "KF2-Inst-1:")
; don't show unregistered info if keyfile present
(foreach "KF2-Inst-1:" ".KingFisher.key(%|.gz)"
(set ViewInfo 0))
(if (exists "KFDEST:.KingFisher.key")
(set ViewInfo 0))
(if (in opts 0) (
(set workinfo "KingFisher Database Software")
(set always 1)
(foreach "KF2-Inst-1:" "(KingFisher|KFServer)(%|.gz)"
(condcopy))
(set always 0)
(foreach "KF2-Inst-1:" "(KingFisher.info|KFServer.prefs)(%|.gz)"
(condcopy))
(foreach "KF2-Inst-1:" ".KingFisher.key(%|.gz)"
(condcopy))))
(if (in opts 1) (
(set workinfo "AmigaGuide® Online Documentation")
(set always 1)
(foreach "KF2-Inst-1:" "KingFisher2.guide(%|.gz)"
(condcopy)
(if cond-copied (
(if (or (<= dosver 38) WrapIt)
((working "\nWord-wrapping KingFisher2.guide\nfor use with AmigaGuide V34")
(run ("stack 50000\nram:WrapGuide %s 65" "KFDEST:KingFisher2.guide")))))))
(foreach "KF2-Inst-1:" "KingFisher2.guide.info(%|.gz)"
(condcopy)
(if cond-copied (
((if (>= dosver 39)
((working "Adjusting KingFisher2.guide icon for MultiView")
(tooltype
(dest "KFDEST:KingFisher2.guide")
(setdefaulttool "MultiView"))))))))
(foreach "KF2-Inst-1:" "History(%|.gz)"
(condcopy))
(foreach "KF2-Inst-1:" "#?IFF(%|.gz)"
(condcopy))))
(if (in opts 2) (
(working ("\nInstalling KingFisher Release 2\n\nLanguage Catalogs"))
(if (not (exists "KFDEST:Catalogs"))
(makedir "KFDEST:Catalogs" (safe)))
(if (in catalogs 0) ((set language "Dansk") (install-language)))
(if (in catalogs 1) ((set language "Deutsch") (install-language)))
(if (in catalogs 2) ((set language "Español") (install-language)))
(if (in catalogs 3) ((set language "Nederlands") (install-language)))
(if (in catalogs 4) ((set language "Suomi") (install-language)))
(if (in catalogs 5) ((set language "Svenska") (install-language)))))
(if (in opts 3) (
(set workinfo "RexxFisher and Examples")
(set always 1)
(foreach "KF2-Inst-1:" "RexxFisher(%|.gz)"
(condcopy))
(set always 0)
(foreach "KF2-Inst-1:" "#?.kfrx(%|.gz)"
(condcopy))))
(if (in opts 5) (
(set workinfo "Miscellaneous Example Files")
(set always 0)
(foreach "KF2-Inst-1:" "Example#?.format(%|.gz)"
(condcopy))
(foreach "KF2-Inst-1:" "#?.search(%|.gz)"
(condcopy))
(foreach "KF2-Inst-1:" "(%|.)Product-Info(%|.gz)"
(condcopy))))
(if (in opts 6) (
(set workinfo "Demonstration Button Images")
(set always 0)
(foreach "KF2-Inst-1:" "gad.#?.image(%|.gz)"
(condcopy))))
(if (in opts 7) (
(set workinfo "KingFisher Developer Kit")
(copyfiles (source "KF2-Inst-1:Developer") (dest "KFDEST:Developer") (all))
(run ("stack 50000\nram:gunzip >NIL: <NIL: -rf Developer"))))
(if (in opts 4) (
(set workinfo "1000 Fish Database")
(set always 0)
(foreach "KF2-Inst-1:" "1000Fish.kfdb(%|.gz)"
(condcopy))
(set filepath "KF2-Inst-2:")
(askdisk
(prompt "\nPlease insert the disk labeled\n\n\"KingFisher Disk 2\"")
(dest "KF2-Inst-2")
(help (cat
"The requested disk contains the '1000 Fish Database' which is installed "
"as the default database. KingFisher may not function as desired if you "
"do not install this database.\n\nIf you do not want this database you "
"may terminate the Installation process. Bewarned that some cleanup "
"procedures will be omitted in that case, but this is nothing serious."))
(assigns))
(working "\nContinuing installation...")
(viewreadme)
(foreach "KF2-Inst-2:" "1000Fish#?.(data|index)(%|.gz)"
(condcopy))))
(viewreadme)
(complete 100)
(delete "ram:gunzip")
(delete "ram:WrapGuide")
(makeassign "KFDEST")
(makeassign "KFINST")
(makeassign "KF2-Inst-1")
(makeassign "KF2-Inst-2")
(exit)